package 设计模式.strategy;

/**
 * @功能
 * @创建时间 2020/5/4
 * 算法独立
 */
public class Context {
    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    protected void printPrice(Double s){
        System.out.println(strategy.getPrice(s));
    }
}
